<!DOCTYPE html>
<html>
<head>
    <title>入库单</title>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/lib/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/lib/easyui/1.8.1/themes/default/easyui.css" media="all">
    <link rel="stylesheet" href="/lib/easyui/1.8.1/themes/icon.css" media="all">
    <link rel="stylesheet" href="/css/my.css" media="all">
    <style>
        .center-panel form .layui-inline {
            margin-right: 0px;
        }
        .center-panel form .layui-form-label {
            padding: 9px 0px;
        }
        .center-panel form .layui-input-inline {
            width: 150px;
            margin-right: 0px;
        }
        .center-panel form .layui-input-inline input {
            border: none;
        }
        .layui-form-item {
            margin-bottom: 10px;
        }
        .layui-table, .layui-table-view {
            margin: 1px 0;
        }
    </style>
</head>
<body>
<div class="layui-row">
    <div class="layui-col-md12">
        <div class="center-panel">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form id="stock-form" class="layui-form" lay-filter="stock-form">
                        <input type="hidden" name="purOrderId" value="">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">采购单号：</label>
                                <div class="layui-input-inline">
                                    <input name="purOrderCode" readonly class="layui-input" lay-verify="required" placeholder="请填写采购单号">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">采购日期：</label>
                                <div class="layui-input-inline">
                                    <input name="purOrderDate" readonly class="layui-input" placeholder="请选择入库单日期" lay-verify="required">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">供应商：</label>
                                <div class="layui-input-inline">
                                    <input name="supplierName" readonly class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">金额：</label>
                                <div class="layui-input-inline">
                                    <input name="totalPrice" readonly class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div>
                            <p style="color: red;font-size: 10px;">小提示：保本售价=总价÷数量；</p>
                        </div>
                        <!--<table id="stock-table" lay-filter="stock-table"></table>-->
                        <table id="stock-table" style="max-height: 390px;width:100%"
                               data-options="fitColumns: true, autoRowHeight: true, singleSelect: true, rownumbers:true">
                            <thead>
                            <tr>
                                <th data-options="field: 'purOrderDetailId',hidden: 'true'"></th>
                                <th width="22%" data-options="field: 'itemId'">品目名称</th>
                                <!--<th data-options="field: 'itemType',hidden: 'true'"></th>-->
                                <th width="10%" data-options="field: 'purCount'">进货数量</th>
                                <th width="12%" data-options="field: 'totalPrice'">总价(元)</th>
                                <th width="12%" data-options="field: 'stockPrice'">参考售价(元)</th>
                                <th width="10%" data-options="field: 'stockCount',editor: {type:'numberbox',options:{required:true}}">入库数量</th>
                                <th width="10%" data-options="field: 'stockUnitName',editor: {type: 'combobox',options: {editable: false}}">入库单位</th>
                                <th width="12%" data-options="field: 'breakevenPrice'">保本售价(元)</th>
                                <th width="12%" data-options="field: 'sellingPrice',editor: {type: 'numberbox',options: {required: true,precision:4}}">最终售价(元)</th>
                            </tr>
                            </thead>
                        </table>
                        <div class="layui-row layui-col-space10" style="margin-top: 5px;">
                            <div class="layui-col-lg-offset10 layui-col-lg2" style="text-align: right;">
                                <button type="button" lay-filter="submit-btn" lay-submit class="layui-btn layui-btn-sm">入库</button>
                                <button type="button" lay-filter="close-btn" class="layui-btn layui-btn-primary layui-btn-sm">关闭</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/lib/easyui/1.8.1/jquery.min.js"></script>
<script src="/lib/layuiadmin/layui/layui.js"></script>
<script src="/js/common/constant.js"></script>
<script src="/lib/easyui/1.8.1/jquery.easyui.min.js"></script>
<script src="/lib/easyui/1.8.1/locale/easyui-lang-zh_CN.js"></script>
<script src="/views/module/purchase/stock/purStock.js"></script>
</body>
</html>